package svc

import (
	"docker/internal/config"
	model "docker/model/mongo"
)

type ServiceContext struct {
	Config          config.Config
	DockerRunModel  model.DockerRunModel
	DockerfileModel model.DockerfileModel
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:          c,
		DockerRunModel:  model.NewDockerRunModel(c.Mongo.Uri, c.Mongo.Db, c.Mongo.DockerRunModelCollection),
		DockerfileModel: model.NewDockerfileModel(c.Mongo.Uri, c.Mongo.Db, c.Mongo.DockerfileModelCollection),
	}
}
